package Models;

import java.text.SimpleDateFormat;
import java.util.List;
import java.util.Locale;

public class PendingSalesOrder {
    private SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy", Locale.US);
    private int psoID;
    private Customer psoCustID;
    private int psoAllocationID;
    private java.util.Date psoDate;
    private String psoXML;
    private boolean psoComplete;
    private int version;
	private List<PSOLines> psoLines;
    private List<InvPSOLines> invPSOLines;
    
	public int getPsoID() {
		return psoID;
	}
	public void setPsoID(int psoID) {
		this.psoID = psoID;
	}
	public Customer getPsoCustID() {
		return psoCustID;
	}
	public void setPsoCustID(Customer psoCustID) {
		this.psoCustID = psoCustID;
	}
	public int getPsoAllocationID() {
		return psoAllocationID;
	}
	public void setPsoAllocationID(int psoAllocationID) {
		this.psoAllocationID = psoAllocationID;
	}
	public java.util.Date getPsoDate() {
		return psoDate;
	}
	public void setPsoDate(java.util.Date psoDate) {
		this.psoDate = psoDate;
	}
	public String getPsoXML() {
		return psoXML;
	}
	public void setPsoXML(String psoXML) {
		this.psoXML = psoXML;
	}
	public boolean isPsoComplete() {
		return psoComplete;
	}
	public void setPsoComplete(boolean psoComplete) {
		this.psoComplete = psoComplete;
	}
    public int getVersion() {
		return version;
	}
	public void setVersion(int version) {
		this.version = version;
	}
	public List<PSOLines> getPsoLines() {
		return psoLines;
	}
	public void setPsoLines(List<PSOLines> psoLines) {
		this.psoLines = psoLines;
	}
	public List<InvPSOLines> getInvPSOLines() {
		return invPSOLines;
	}
	public void setInvPSOLines(List<InvPSOLines> invPSOLines) {
		this.invPSOLines = invPSOLines;
	}
    
	//Code to display PSO Description.
    public String getDisplayString(){
        return Integer.toString(psoID) + " - " 
                + dateFormat.format(psoDate) + ": " + this.getPsoCustID().getName();
    }
}
